//
//  commonDefines.h
//  Pay
//
//  Created by Jayce on 15/1/22.
//  Copyright (c) 2015年 steve. All rights reserved.
//

#ifndef Pay_commonDefines_h
#define Pay_commonDefines_h

#define IPAddress @"http://120.24.70.17:9090/soundWave/"
#define GetInfor @"gameuser/updateUser"
#define StartGame @"game/start"
#define JoinGame @"gameuser/joinGame"
#define EndGame @"game/endGame"
#define BossGetWinnerInfor @"gameuser/sendInfoToBoss"
#define StaffGetResult @"gameuser/sendResultToStaff"
#define SendOrCancel @"gameuser/sendOrCancel"

#define STAFF_REQUEST_TIMEOUT @"timeout"
#define GREEN_USER_ID @"account"
#define GREEN_USER_ISBOSS @"secureToken"
#define GREEN_USER_LOCATION @"location"
#define USER_SELECT_DELIVER @"deliver"
#define GREEN_SETTING_EACH @"GREEN_SETTING_EACH"
#define GREEN_USER_BUDGET @"GREEN_USER_BUDGET"

#define kMSG001 @"Sorry,please check Network"

//color
#define RGB(r, g, b) [UIColor colorWithRed:((r) / 255.0) green:((g) / 255.0) blue:((b) / 255.0) alpha:1.0]
#define RGBAlpha(r, g, b, a) [UIColor colorWithRed:((r) / 255.0) green:((g) / 255.0) blue:((b) / 255.0) alpha:(a)]
#define HexRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define HexRGBAlpha(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)]

typedef NS_ENUM(NSInteger, kRequestAction) {
    ActionGetInfor = 0,
    ActionStartGame,
    ActionBossGetWinnerInfor,
    ActionStaffGetResult,
    ActionSendOrCancel,
    ActionJoinGame,
    ActionEndGame,
};

typedef NS_ENUM(NSInteger, kJoinResult) {
    resultDraw = 0,
    resultNoDraw,
    resultPremature,
    resultLate,
    resultTow,
};
#endif
